class TaskMgrWrapper:
    def __init__(self):
        self.taskNameDict = {}

    def Add(self, fn, name, sort=0, delayTime=None, extraArgs=[]):
        if not self.taskNameDict.has_key(name):
            if delayTime is None:
                taskMgr.add(fn, name, sort)
            else:
                taskMgr.doMethodLater(delayTime, fn, name, extraArgs = extraArgs)
            self.taskNameDict[name] = 0

    def Remove(self, name):
        if self.taskNameDict.has_key(name):
            taskMgr.remove(name)
            del self.taskNameDict[name]

    def RemoveAll(self):
        for name in self.taskNameDict.keys():
            taskMgr.remove(name)
        self.taskNameDict.clear()